POV-Ray : Newsgroups : povray.general : Passing macro as parameter : Re: Passing macro as parameter Server Time
7 Aug 2024 07:11:56 EDT (-0400)
  Re: Passing macro as parameter  
From: JRG
Date: 28 Oct 2001 08:56:34
Message: <3bdc0e92@news.povray.org>
First you define your two macros, then you can use one as a parameter for
the other one:

example (not tested)

#macro SQUARE (A)
A*A
#end

#macro INCR (B)
B+1
#end

#declare c=SQUARE ( INCR (2) ); // it should give you (2+1)^2=9


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.